<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib prefix="s" uri="/struts-tags" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <jsp:include page="/webmanager/inityman.jsp"></jsp:include>
	<head>
		<base href="<%=basePath%>">
		<title>公司信息</title>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<link rel="stylesheet" href="<%=path%>/css/main_css.css" type="text/css"></link>
		<script type="text/javascript">
		   function doAdd(){
				 URL="<%=path%>/webmanager/gsxx/createGsxx.jsp";
				 myleft=(screen.availWidth-700)/2;
				 mytop=300
				 mywidth=800;
				 myheight=600;
				 window.open(URL,"read_news","height="+myheight+",width="+mywidth+",status=1,toolbar=no,menubar=no,location=no,scrollbars=yes,top="+mytop+",left="+myleft+",resizable=yes");
          }
          //双击打开方法
			function showDetailDialog(value){
				var ranNum = (Math.random()*100000000).toFixed(0);	
				var action = "getGsxxById.do?zids="+value+"&ranNum="+ranNum+"&show=yes";	
			 	var win = window.showModalDialog(action,null,'dialogHeight=650px;dialogWidth=900px;status=no;help=no;scroll=auto;colose=no;');
				if(win && win=='OK'){		
					document.location.reload();	  
				}
				
			}
			// 修改
			function doUpdate(){
				var ids=getSelectedIds();
				if(ids.length>1){
				     alert("只能选择一条数据进行修改");
				     return;
				}
				var ranNum = (Math.random()*100000000).toFixed(0);	
				var action = "getGsxxById.do?zids="+ids[0]+"&ranNum="+ranNum+"&show=yes";	
			 	var win = window.showModalDialog(action,null,'dialogHeight=650px;dialogWidth=900px;status=no;help=no;scroll=auto;colose=no;');
				if(win && win=='OK'){		
					document.location.reload();	  
				}
			}
			// 删除
			function doDelete(){
			  var ids = getSelectedIds();
			  var zids = document.getElementById("zids");
			  zids.value = ids.join();
			  if(confirm("确定要删除么？")){
			     document.frm.action ="gsxx/deleteGsxx.do";
			     frm.submit();
			  }else{
			    return ;
			  }
			 }
			 //查询
			 function doSearch(){
			   document.frm.submit();
			 }
		</script>
	</head>
	
	<body>
		<form action="gsxx/listGsxx.do" name="frm" method="post">
			<input type="hidden" name="actionId" value="010301" id="actionId" />
            <input type="hidden" name="zids" id="zids"/> 
			<table cellspacing="0" cellpadding="0" class="main_tab1">
				<tr>
					<td class="main_tab1_td1">
						<img src="<%=path%>/images/img_main_tab1_td1.gif" alt="left" />
					</td>
					<td class="main_tab1_td2">
						<div id="location">
							公司信息
						</div>
						<div id="funbut">
							<SCRIPT>document.write(mwritetodocument());</SCRIPT>
						</div>
					</td>
					<td class="main_tab1_td1">
						<img src="<%=path%>/images/img_main_tab1_td3.gif" alt="right" />
					</td>
				</tr>
				<tr>
					<td colspan="3" class="main_tab1_td3">
						<div id="mainbg">

							<div class="jiange10"></div>
							<table width="100%" border="0" cellspacing="0" cellpadding="0"
								class="main_tab3">
								<tr>
									<th class="text_al_3">
										<img src="<%=path%>/images/img_ht_wz_58.gif" alt="查询条件"
											class="img_01">
										查询条件
									</th>
									<td>
										<table width="100%" border="0" cellspacing="0" cellpadding="0"
											class="main_tab4">
											<tr>
												<td>
													<div align=left>
														<!-- 基本信息查询条件，根据radio的选择来显示不同的输入框 -->
														<div>
															 公司名称：
															<input type="text" id="gsmc" name="gsmc" value=""/>
														</div>
													</div>	
												</td>
											</tr>
										</table>
									</td>
								</tr>
							</table>
							<table width="100%" border="0" cellspacing="0" cellpadding="0"
								class="main_tab2">
							</table>

							<div style="height: 82%; width: 100%; overflow: auto;">
								<input type='hidden' name='object.id' />
								<table width="100%" border="1" cellspacing="0" id="theObjTable"
									cellpadding="2" class="main_tab2">
									<tr>
										<th id="listTbCheckbox">
											<font class="resizeDivClass"></font>
											<input type="checkbox" name="selectall"
												onclick="setAll('ids',this.checked)" />
											&nbsp;全选
										</th>
										<th>公司名称</th>
										<th>公司地址</th>
										<th>电话</th>
										<th>联系人</th>
										<th>传真</th>
									</tr>
								<s:iterator value="listGsxx">
									<tr class="main_tab2_td2" style="cursor:hand" ondblclick="return showDetailDialog('<s:property value='id'/>');">
										<td class="text_al_1">
											<input name="ids" type="checkbox" onclick="javascript:return setNoAll('ids');" value="<s:property value='id'/>" />
										</td>
										<td><s:property value="name"/></td>
										<td><s:property value="address"/></td>
										<td><s:property value="phone"/></td>
										<td><s:property value="menber"/></td>
										<td><s:property value="fax"/></td>
									</tr>
								</s:iterator>
								</table>
							</div>
							<jsp:include page="<%=path%>/webmanager/page.jsp">
							   <jsp:param name="pageListAction" value="gsxx/listGsxx.do"/>
							   <jsp:param name ="where" value="${whereClause}"/>
							</jsp:include>
						</div>
					</td>
				</tr>
				<tr>
					<td class="main_tab1_td4">
						<img src="<%=path%>/images/img_ht_wz_65.gif" alt="left" />
					</td>
					<td class="main_tab1_td5"></td>
					<td class="main_tab1_td4">
						<img src="<%=path%>/images/img_ht_wz_67.gif" alt="right" />
					</td>
				</tr>
			</table>
		</form>
	</body>
</html>
